1. Field of the Invention
The present invention relates to a three-dimensional object movement and transformation processing apparatus in which movement and transformation of an object required for picture processing and robot control are performed in a three-dimensional space with an inverse matrix calculating apparatus.
2. Description of the Related Art
2.1. Previously Proposed Art
FIG. 1 schematically shows an operating system for operating a three-dimensional object movement processing apparatus conventionally utilized.
As shown in FIG. 1, an operating system 11 comprises a graphical work station 12 having a conventional three-dimensional object movement processing apparatus for generating computer graphic pictures in a virtual three-dimensional space at high speed, a display apparatus 13 for displaying the computer graphic pictures, and an input unit 14 such as a mouse or a key board for inputting an instruction of a user to operate the conventional three-dimensional object movement processing apparatus in which an object is moved in the virtual three-dimensional space according to the user's instruction.
FIG. 2 shows objects 21a, 21b displayed in the display apparatus 13. As shown in FIG. 2, a shape of the object 21a is prescribed in a shape prescription coordinate system Co.sub.1, and a shape of the object 21b is prescribed in another shape prescription coordinate system Co.sub.2. That is, each of the object shapes is prescribed in the shape prescription coordinate system Co.sub.1 or Co.sub.2, and a position of the object 21a or 21b in the shape prescription coordinate system Co.sub.1 or Co.sub.2 is unchanged even though the object is moved. In other words, the shape prescription coordinate systems Co.sub.1, Co.sub.2 are moved with the objects 21a, 21b in one-to-one correspondence. Also, the shapes of the objects 21a, 21b are prescribed in a world coordinate system Cw in common, and the world coordinate system Cw is unchangeable even though the objects 21a, 21b are moved.
In the conventional three-dimensional object movement processing apparatus, various pieces of three-dimensional spatial object data of the objects are stored. For example, a transformation matrix Mow is included as one of the data to transform a shape prescription coordinate system Co prescribing a shape of an object to the world coordinate system Cw to prescribe a shape of the object in the world coordinate system Cw. Also, a position vector Po of the object prescribed in the shape prescription coordinate system Co is included in the three-dimensional spatial object data. To obtain a position vector Pw of the object prescribed in the world coordinate system Cw, an equation (1) is applied. EQU Pw=Po Mow (1)
Also, in cases where a pair of objects are processed while relating to each other, not only the transformation matrix Mow transforming the shape prescription coordinate system Co to the world coordinate system Cw but also another transformation matrix Mwo transforming the world coordinate system Cw to the shape prescription coordinate system Co are required. Specifically, as shown in FIG. 3, in cases where a pair of rectangular planes 31a, 31b arranged in the virtual three-dimensional space are cut along a crossed line 32 of those rectangular planes 31a, 31b, shapes of the rectangular planes 31a, 31b prescribed in shape prescription coordinate systems Co.sub.1, Co.sub.2 are transformed to shapes of the rectangular planes 31a, 31b prescribed in the same world coordinate system Cw by utilizing transformation matrices Mo.sub.1 w, Mo.sub.2 w. Thereafter, the crossed line 32 prescribed in the world coordinate system Cw is obtained. Thereafter, the crossed line 32 prescribed in the world coordinate system Cw is transformed to the crossed line 32 prescribed in the shape prescription coordinate systems Co.sub.1, Co.sub.2 by utilizing transformation matrices Mwo.sub.1, Mwo.sub.2. Thereafter, the rectangular plane 31a is cut along the crossed line 32 prescribed in the shape prescription coordinate system Co.sub.1, and the rectangular plane 31b is cut along the crossed line 32 prescribed in the shape prescription coordinate system Co.sub.2.
Accordingly, two types of transformation matrices Mow, Mwo are required in cases where a plurality of objects are processed while relating to each other.
Next, a moving process in which a parallel translation and a rotational motion is given to an object is described.
When a parallel translation and a rotational motion is performed to move an object, a shape prescribing coordinate system Co prescribing a shape of the object is also moved with the object to keep an unchangeable positional relationship between the object and the shape prescribing coordinate system Co. In contrast, the world coordinate system Cw is unchangeable even though the object is moved. Therefore, the transformation matrices Mow, Mwo of the object are required to be changed to transformation matrices Mow(new), Mwo(new) when the object is moved.
FIG. 4 is a constitutional block diagram of a conventional three-dimensional object movement processing apparatus.
As shown in FIG. 4, a conventional three-dimensional object movement processing apparatus 41 is provided with a shape storing section 42 for storing pieces of shape data of a plurality of objects respectively prescribed in a particular shape prescription coordinate system Co (Co.sub.1, Co.sub.2, . . . ) in a virtual three-dimensional space, a Mow transformation matrix storing section 43 for storing a plurality of transformation matrices Mow transforming the shape prescription coordinate system Co prescribing the shape data of the objects to the world coordinate system Cw to prescribe the shape data in the world coordinate system Cw, and a Mwo transformation matrix storing section 44 for storing a plurality of transformation matrices Mwo transforming the world coordinate system Cw to the shape prescription coordinate system Co to prescribe the shape data of the object in the system Co.
The apparatus 41 is further provided with the input unit 14 for inputting a piece of movement data designating a parallel translation amount and a rotational motion amount of an object and inputting a piece of inter-object processing data to process a plurality of objects relating to each other, an input data judging section 45 for judging whether the input data given to the input unit 14 is either the movement data or the inter-object processing data, a movement matrix generating section 46 for generating transformation matrices Mwm, Mmw between the world coordinate system Cw and a movement coordinate system Cm prescribing the movement of the object and movement matrices Mm, Mm' indicating the movement of the object in the movement coordinate system Cm in cases where it is judged in the input data judging section 45 that the movement data is input to the input unit 14, and an affine matrix calculating section 47 for multiplying affine matrices represented by the transformation matrices Mow, Mwo stored in the Mow and Mwo transformation matrix storing sections 43, 44 and the matrices Mm, Mm', Mwm, Mmw generated in the movement matrix generating section 46 to newly produce transformation matrices Mow(new), Mwo(new) relating to the object moved and rotated. The transformation matrices Mow(new), Mwo(new) produced are stored in the Mow and Mwo transformation matrix storing sections 43, 44 to replace the matrices Mow, Mwo with the matrices Mow(new), Mwo(new).
The apparatus 41 is further provided with an inter-object processing section 48 for processing a plurality of objects relating to each other by utilizing the shape data of the objects stored in the shape storing section 42 and the transformation matrices Mow, Mwo stored in the Mow and Mwo transformation matrix storing sections 43, 44 in cases where it is judged in the input data judging section 45 that the inter-object processing data is input to the input unit 14, a picture drawing section 49 for drawing shapes of the objects prescribed in the common world coordinate system Cw by utilizing the shape data of the objects stored in the shape storing section 42 and the transformation matrix Mow stored in the Mow transformation matrix storing section 43, and the display 13 for displaying the shapes of the objects drawn in the picture drawing section 49.
In the above configuration, in cases where the inter-object processing data is input to the input unit 14 to process a plurality of objects relating to each other, the objects are processed in the inter-object processing section 48. Therefore, the objects are, for example, cut along the crossed line 32, as is described above. Thereafter, the shape data of the objects stored in the shape storing section 42 are replaced with pieces of shape data newly obtained in the inter-object processing section 48.
In cases where the movement data is input to the input unit 14 to move an object from a first point to a second point, transformation matrices Mow, Mwo of the object stored in the Mow and Mwo transformation matrix storing sections 43, 44 are changed to transformation matrices Mow(new), Mwo(new). Here, the transformation matrices Mow, Mwo relate to the object positioned at the first point, and the transformation matrices Mow(new), Mwo(new) relate to the object positioned at the second point. The change of the transformation matrix Mow to the transformation matrix Mow(new) is performed in the affine matrix calculating section 47 according to equation (2). EQU Mow(new)=MowMwmMmMmw (2)
In detail, the shape prescribing coordinate system Co prescribing the shape of the object is transformed to the world coordinate system Cw by the transformation matrix Mow. Thereafter, the world coordinate system Cw is transformed to the movement coordinate system Cm by the transformation matrix Mwm. Thereafter, the object is moved in the movement coordinate system Cm according to the movement matrix Mm. The movement coordinate system Cm and the movement matrix Mm are determined in dependence on the movement data. Thereafter, the movement coordinate system Cm is transformed to the world coordinate system Cw by the transformation matrix Mmw. Therefore, the transformation matrix Mow(new) relating to the subject positioned at the second point is determined.
Also, the change of the transformation matrix Mwo to the transformation matrix Mwo(new) is performed in the affine matrix calculating section 47 according to equation (3). EQU Mwo(new)=MwmMm'MmwMwo (3)
In detail, the world coordinate system Cw is transformed to the movement coordinate system Cm by the transformation matrix Mwm. Thereafter, the object is moved in the movement coordinate system Cm according to the movement matrix Mm'. The movement indicated by the movement matrix Mm' is opposite to the movement indicated by the movement matrix Mm. Thereafter, the movement coordinate system Cm is transformed to the world coordinate system Cw by the transformation matrix Mmw. Thereafter, the world coordinate system Cw is transformed to the shape prescribing coordinate system Co prescribing the shape of the object by the transformation matrix Mwo. Therefore, the transformation matrix Mwo(new) relating to the subject positioned at the second point is determined.
Here, each of the transformation matrices Mow, Mwo, Mwm, Mm, Mm', and Mmw is an affine matrix formed by a fourth-order square matrix because the affine matrix has a minor matrix indicating a linear transformation of the object in the virtual three-dimensional space and a position vector indicating a parallel translation of the object.
Thereafter, the transformation matrices Mow, Mwo stored in the Mow and Mwo transformation matrix storing sections 43, 44 are replaced with the transformation matrices Mow(new), Mwo(new).
Accordingly, even though an object is moved to a new point in the virtual three-dimensional space, the shape of the object positioned at the new point in the world coordinate system Cw can be drawn in the picture drawing section 49, and the shape of the object drawn can be displayed in the display 13.
2.2. Problems to be Solved by the Invention
However, the transformation matrix Mwo(new) is obtained by multiplying four types of fourth-order affine matrices each other in the affine matrix calculating section 47 according to the equation (3). To multiply a pair of fourth-order matrices each other, 64 (=4.times.4.times.4) times multiplications are generally required. Therefore, the number of multiplications required to move an object in the virtual three-dimensional space sums up to 192 (=3.times.4.times.4.times.4). Accordingly, in cases where the movement of many objects are processed in the conventional three-dimensional object movement processing apparatus 41, there is a drawback that responsibility in the operating system 11 having the conventional three-dimensional object movement processing apparatus 41 deteriorates.
Also, in cases where an inverse transformation matrix Mow.sup.-1 (new) of the transformation matrix Mow(new) is calculated as the transformation matrix Mwo(new), a cofactor expansion is recursively performed to calculate a determinant .vertline.Mow(new).vertline.. In detail, in cases where a cofactor of a component a.sub.ij in a matrix A is expressed by a symbol .DELTA.ij, an inverse matrix A.sup.-1 of the matrix A is formulated by an equation (4). ##EQU1##
In this case, the number N of multiplications required to obtain the inverse matrix A.sup.-1 is formulated by an equation (5). ##EQU2##
Therefore, when the inverse transformation matrix Mow.sup.-1 (new) of the transformation matrix Mow(new) formed by the fourth-order affine matrix is calculated, the number N of multiplications required sums up to 200 according to an equation (6). ##EQU3##
Therefore, in cases where many objects are moved, the responsibility in the operating system 11 having the conventional three-dimensional object movement processing apparatus 41 also deteriorates.